package com.newcapec.news.service.impl;

import com.newcapec.news.dao.NewsDao;
import com.newcapec.news.dao.impl.NewsDaoImpl;
import com.newcapec.news.entity.News;
import com.newcapec.news.service.NewService;

import java.util.List;

/**
 * @Description:
 * @Author: fujun
 * @Date : 2022/3/31 8:42
 * @Version : 1.0
 * @company 新开普电子股份有限公司
 */
public class NewServiceImpl implements NewService {
    private NewsDao newsDao=new NewsDaoImpl();
    @Override
    public void insertNews(News news) {
        newsDao.insertNews(news);
    }

    @Override
    public void updateNews(News news) {
        newsDao.updateNews(news);
    }

    @Override
    public void deleteNews(int id) {
        newsDao.deleteNews(id);
    }

    @Override
    public List<News> queryNews() {
        return newsDao.queryNews();
    }

    @Override
    public News getNews(int id) {
        return newsDao.getNews(id);
    }

    @Override
    public List<News> queryNewsByChannel(int chnl_code) {
        return newsDao.queryNewsByChannel(chnl_code);
    }
}
